file = open("15_class.py", 'r', encoding='utf - 8')  # 该函数可以指定读的方式与编码
print(file.read())  # file.readline() file.readlines()
file.close()  # 关闭文件，释放系统资源

print("-" * 200)

with open("15_class.py", 'r', encoding='utf - 8') as f:
    print(f.readlines())
